﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.IO;

public partial class top_2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    public string getLogo()
    {
        string sql = string.Format("select logo from JiGouPeiZhi where JiGouMingCheng='{0}'", Session["sJiGou"].ToString());
        DataTable dt = DbHelper.ExecuteTable(CommandType.Text, sql, null);
        if (dt.Rows.Count == 1)
        {
            string imgPath = dt.Rows[0]["logo"].ToString().Replace("../", "");
            if (!File.Exists(MapPath(imgPath)))
            {
                return "image1/07baby.swf";

            }
            else
            {
                return imgPath;
            }
        }
        else
        {
            return "image1/07baby.swf";
        }
    }

    public string getUpperLogo()
    {
        string sql = string.Format("select Figure from JiGouPeiZhi where JiGouMingCheng='{0}' and FigureEnabled=1", Session["sJiGou"]);
        DataTable dt = DbHelper.ExecuteTable(CommandType.Text, sql, null);
        if (dt.Rows.Count == 1)
        {
            string imgPath = dt.Rows[0]["Figure"].ToString().Replace("../", "");
            if (!File.Exists(MapPath(imgPath)))
            {
                return "image1/jiaoyu1.swf";

            }
            else
            {
                return imgPath;
            }
        }
        else
        {
            return "image1/jiaoyu1.swf";
        }
    }
}
